package cn.lijiajia3515.cairo.auth.modules.account;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Set;

@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class SaveAccountParam implements Serializable {

	/**
	 * 用户名
	 */
	@NotNull(groups = {Reg.class, Save.class})
	private String username;

	/**
	 * 手机号
	 */
	private String phoneNumber;

	/**
	 * 邮箱
	 */
	@Valid
	private String email;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 密码
	 */
	@NotNull(groups = {Reg.class, Save.class})
	private String password;

	/**
	 * 角色code
	 */
	@NotNull(groups = {Save.class})
	private Set<String> roleIds;

	/**
	 * 部门
	 */
	@NotNull(groups = {Save.class})
	private Set<String> departmentIds;

	/**
	 * 资源code
	 */
	@NotNull(groups = {Save.class})
	private Set<String> resourceIds;

	/**
	 * 额外资源
	 */
	private Set<String> authorities;

	/**
	 * 注册参数
	 */
	public interface Reg {

	}

	public interface Save {

	}

}
